
import serial
import time
from threading import Thread

port = serial.Serial('COM3')

class radi(Thread):
	KONSTANTA = 12312
	
	def __init__(self):
		Thread.__init__(self)
	
	def run(self):
		while 1:
			print port.read()

port.open()
port.open()

t = radi()
t.setDaemon(True)

t.start()

print 'send: %s' % ('Aleksa', )
port.write('Aleksa')
port.write('Car')


time.sleep(6)
port.close()

print 'done ..'

